<% include header %>
<!--登录注册的页面-->
<div class="text-center">
    <img src="/images/loginZhihu.jpg" alt="知乎的图标" class="img-rounded">
    <p class="logoWrite">与世界分享你的知识、经验和见解</p>
    <a class="regWrite" href="/regForm">注册</a>
    <a class="loginWrite" href="/loginForm">登录</a>
</div>
<div class="text-center infoMessage">
<!--提示信息的区域-->
<% if(success){ %>
    <%= success %>
<% }else{ %>
    <%= error %>
<% } %>
</div>
<!--注册成功，跳转到/regAction页面-->
<form class="form-horizontal" action="/regAction" method="post">
    <div class="form-group">
        <label for="inputEmail3" class="col-sm-4 control-label">用户名</label>
        <div class="col-sm-4">
            <input type="text" name="name" pattern="^[\u4e00-\u9fa5]{2,4}$" class="form-control" id="inputEmail3" placeholder="请输入中文用户名">
        </div>
    </div>
    <div class="form-group">
        <label for="inputPassword3" class="col-sm-4 control-label">密码</label>
        <div class="col-sm-4">
            <input type="password" pattern="[0-9a-zA-Z]{6,16}" name="password" class="form-control" id="inputPassword3" placeholder="请输入6-8位密码">
        </div>
    </div>
    <div class="form-group">
        <label for="inputPassword3" class="col-sm-4 control-label">确认密码</label>
        <div class="col-sm-4">
            <input type="password" name="password-repeat" class="form-control" id="inputPassword3" placeholder="请再次输入密码">
        </div>
    </div>
    <div class="form-group">
        <label for="inputPassword3" class="col-sm-4 control-label">邮箱</label>
        <div class="col-sm-4">
            <input type="email" name="email" class="form-control" id="inputPassword3" placeholder="请输入邮箱地址" pattern="^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$">
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-4 col-sm-5">
            <button type="submit" class="btn btn-default">注册</button>
        </div>
    </div>
</form>

<div class="text-center bottomText">
    <p>知乎 - Thousands Find</p>
    <p>Designed By ZhiHu & <a href="http://www.zhihu.com">ZhiHu</a> 2017</p>
</div>

<% include footer %>

<script>
    $(function () {
        setTimeout(function () {
            $('.infoMessage').fadeOut();
        },2000)

    })

</script>


